package com.woniuxy.order.controller;


import com.woniu.zsd.commons.core.model.Result;
import com.woniuxy.order.service.IOrderWasteService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import zsd.waste.dto.OrderWasteDto;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-05-13
 */
@RestController
@RequestMapping("/order-waste")
@Api(tags = "订单废品相关信息")
public class OrderWasteController {

    @Resource
    private IOrderWasteService orderWasteService;

    /**
     * 根据订单号查询相关废品信息操作
     *
     * @return
     */
    @GetMapping("/findOrderIdWaste")
    @ApiOperation("根据订单号查询相关废品信息操作")
    public Result<List<OrderWasteDto>> findOrderIdWaste(String orderNum,Integer pageNum,Integer pageSize)throws Exception{
        List<OrderWasteDto> list = orderWasteService.findOrderIdWaste(orderNum,pageNum,pageSize);
        return Result.getListResult(OrderWasteDto.class).setMsg("根据订单号查询相关废品信息成功").setData(list);
    }




}
